OData Programming Cookbook for .NET Developers by unknow

OData Programming Cookbook for .NET Developers by unknow

Author:unknow
Language: eng
Format: epub
Publisher: Packt Publishing


Build the solution and launch the Silverlight test page (within the ODataSilverlightApp.Web project) in the web browser.

How it works...

There are three Silverlight pages in the sample application. The MainPage.xaml page acts as a navigation container, which uses the Frame control to host other pages (so that users can switch between the CustomerList.xaml and CustomerOrders.xaml pages within the same container page).

Both CustomerList.xaml and CustomerOrders.xaml pages use the Visual Studio generated OData proxy to fetch entity objects from the Northwind OData service. And for data binding consideration, we use instances of the DataServiceCollection<T> class to hold the returned entity objects so that they can be directly bound to the Silverlight DataGrid Controls.

In addition, all the OData queries are executed in an asynchronous manner here. This is because all network access APIs (such as WebRequest class, Web Service, or WCF client proxies) are by design asynchronous only. This can help preventing the Silverlight (web browser host) UI from being frozen by long-running network access code.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.